Dynomotion

Group: DynoMotion Message: 830 From: cell.vlad Date: 1/1/2011
Subject: How to add Home switch to Cofig?
Tom,
Spending some time reading group, I could not find any mention how to
setup a Home Switch to Configuration, and convert to C code. Perhaps
there is a special reserve words to make input from Home switch. When
I generate C code, there is no such word connected to Home switch or on
Configuration screen there is no Home switch option, however in IO
screen is mentioned an "Home" device.
Or there is different requirements ... Please help.

On same hand, for instance if I would like to have two Home positioning
switches - let say LeftHome and RightHome on X_axis, how it would be
possible to make them be present at same time and chose dynamically
where I need to machine have their home position.

Thanks,
Vlad
Group: DynoMotion Message: 832 From: Tom Kerekes Date: 1/1/2011
Subject: Re: How to add Home switch to Cofig?
Hi Vlad,
 
There is no configuration for homing.  You must write a C program yourself to do homing.  See the example SimpleHome.c for the simplest example which just Jogs an axis, waits for an input to change state, then stops.  I'm not sure why you would want to home to the left sometimes and to the right othertimes, but using C programs allows you this type of flexibility.
 
Regards
TK 
 
#include "KMotionDef.h"
main()
{
    Jog(0,-100);          // start moving
    while (!ReadBit(8)) ; // wait for switch (input #8) to change
    Jog(0,0);        // stop
}

Group: DynoMotion Message: 833 From: cell.vlad Date: 1/1/2011
Subject: Re: How to add Home switch to Cofig?
Tom,
Reason to have two Home - a few different fixtures would be loaded at same time, so a fixed Home positions would required to go from right and left approach.  Basically, both sensors has own set of stops, so I can made a few fixtures, with own stops, which will have a fix "home" positions and would fast position enable.

How to made Home become clear, Thanks.  So it need to be incorporated like a C code.

On another hand, putting together all elements, I got to the point to check all 3 axes. 
I connect  Step/Dir  to IO as following:
X->8/9 - Channel 0,
Y->10/11 - Channel 1,
Z->12/13 - Channel 2,
Execute command:    DefineCS=0 1 2 -1 -1 -1 -1
also enable all 3 axis...

When I try to execute following:
on jog0=100 responding X
on jog1=100 responding Z
on jog2=100 no responding...

I check couple of times wiring and using scope check outputs...
Where is a problem?  What I am missing?

Thanks,
Vlad





--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Vlad,
>
> There is no configuration for homing.  You must write a C program yourself to do
> homing.  See the example SimpleHome.c for the simplest example which just Jogs
> an axis, waits for an input to change state, then stops.  I'm not sure why you
> would want to home to the left sometimes and to the right othertimes, but using
> C programs allows you this type of flexibility.
>
> Regards
> TK 
>
>
> #include "KMotionDef.h"
> main()
> {
>     Jog(0,-100);          // start moving
>     while (!ReadBit(8)) ; // wait for switch (input #8) to change
>     Jog(0,0);        // stop
> }
>
>
>
>
> ________________________________
> From: cell.vlad cell.vlad@...
> To: DynoMotion@yahoogroups.com
> Sent: Sat, January 1, 2011 5:50:26 PM
> Subject: [DynoMotion] How to add Home switch to Cofig?
>
>  
> Tom,
> Spending some time reading group, I could not find any mention how to
> setup a Home Switch to Configuration, and convert to C code. Perhaps
> there is a special reserve words to make input from Home switch. When
> I generate C code, there is no such word connected to Home switch or on
> Configuration screen there is no Home switch option, however in IO
> screen is mentioned an "Home" device.
> Or there is different requirements ... Please help.
>
> On same hand, for instance if I would like to have two Home positioning
> switches - let say LeftHome and RightHome on X_axis, how it would be
> possible to make them be present at same time and chose dynamically
> where I need to machine have their home position.
>
> Thanks,
> Vlad
>
Group: DynoMotion Message: 834 From: Tom Kerekes Date: 1/1/2011
Subject: Re: How to add Home switch to Cofig?
Hi Vlad,
 
That wiring sounds correct, but how are you setting the parameters and configuration for the axes?  Using the "Move" button on the Step Response Screen is the simplest way of downloading all the settings, enabling an axis, and performing a move.  See:
 
 
 
Regards
TK

Group: DynoMotion Message: 836 From: cell.vlad Date: 1/2/2011
Subject: Re: How to add Home switch to Cofig?
Tom,
It is interestingly enough, I think you would be wondering to know.

First of all, I did all possible precautions with grounding, cabling, shielding, separate high quality power supply for 5v and 12v, etc.  All software updated to 4.23 version.

I see some irregularity in KFlop responses and almost random readings.
So, after complete KFlop reload, power-off reset, and PC restart, same commands to a same Axis Channel (ACH) has different reaction - suddenly ACH_0 start to vibrate after jog2=100 command send via console.
I turned off whole system and power-on again, symptom disappear.
For some reason I could not make a physical ACH_1 respond to command, but it has physical ACH_2 responding on jog1=100 command from console.

Yes, I did try MOVE from Step response. Reaction same - physical ACH_2 responding on MOVE button.


I guess, it is some how deal with configuration...   Perhaps until I try during my initial hookup, some settings was made.  So, I did reload KFlop by "New Version" button on Config and Flash - same effect.

How it is possible to wipe all to original factory setting, both KFlop and PC versions?  Reinstall all?  Please advise.

Also, I see some bugs, which would be interested for developers to collect and fix them in next version. Do you have an folder on group where is that feedback is collected? I suggest to have an "sticky" topic named for instance "Bug reports" or similar, where members would leave an feedback, since it is valuable for developers.


Thanks,
Vlad

Group: DynoMotion Message: 840 From: cell.vlad Date: 1/2/2011
Subject: Re: How to add Home switch to Cofig?
Tom, and group,
I made another attempt to make all working, and first I decide to studding how all is responding...
Well, all AxisChannels was working strangely enough. ACH_0 was activate bits 8/9,
ACH_1 - 12/13
ACH_2 - 36/37
ACH_3 - 42/43
ACH_4 - 12/13
...
All wrong... Why? I have no idea...  And seems to me reloading KFlop with 4.23 was not helping. 
Thinking over, I decide to scrap all connected to 4.23 version and use instead 4.22. So, I load KFlop with 4.22 via Cofig&Flash.
Miraculously all start to respond channel by channel... I been able to configure ACH_0, 1, 2.... finally!
Almost finish all configuration with polarity step motors and even put belts and move table and  Z  axes.   Great!

But I could not figure out why 4.23 does not working...   Any one has same experience?  Or at least suggestions?
I move back and forth, tried Step responses and measure with dial accuracy...  All working great! try up to 20000 on Velocity and Acceleration with 2700 in/lb step motors it is monumental, trust me!    Great!

Tomorrow will continue with limit switches and connection to G codes...

Also, in separate thread will publish 12V NPN sensors connection to LVTTL, and circuit to control relay from LVTTL.

Have a fun!
Vlad

Group: DynoMotion Message: 842 From: Tom Kerekes Date: 1/3/2011
Subject: Re: How to add Home switch to Cofig?
Hi Vlad,
There haven't been any reported problems with V4.23.
It sounds like you have a miss understanding on how to configure the axis for Step/Dir Output mode.   Just set OutputChan0 to the Step/Dir Generator Device channel you wish to use (NOT the pin or bit number).
 
This may help:
 
 
TK

Group: DynoMotion Message: 844 From: cell.vlad Date: 1/4/2011
Subject: Re: How to add Home switch to Cofig?
Tom,
Thank you to point in right direction. A documentation and terminology really need to be revised to reflect those moments. It is difficult to guess every time along on the way to connect and use.

I found interesting situation, which is not consistent.
I have AxesCannel1 setup with limit switches, in negative direction "watch limit - bit22", Positive "watch limit - bit 21" and "Disallow drive into limit". From Console i send MoveRel1=-100 towards to negative limit and a soon as limit is detected it is stops movement and do not allow to move in any direction without EnableAxis1 command.  But not all the time. In about 20% of time it will move to +100 and is not necessary to send EnableAxis1 command...
Would you please explain where is the problem?  Do I do something wrong?   Command and Limit Watch setup with "Disallow in to limit" logically shall allow to move away from limit.... I am right? BMHO it shall be not necessary send a EnableAxis<N> command.
And also, where this "some time working" come from?  All command shall be repeated all time?   Please explain.

moverel1=-100
KFLOP 4.22
Ready
Neg Limit Disabled Axis:1
EnableAxis1
KFLOP 4.22
Ready               // movement in positive direction is restored
...
moverel1=-100
KFLOP 4.22
Ready
Neg Limit Disabled Axis:1
moverel1=100     // no movement
KFLOP 4.22
Ready

On another note I think you need to have an folder for collect BugReport.  I still founding some small discrepancies, in current version and would be possible or interested for developers have a feedback?

Console>Help>EnableAxis  ,  on the bottom says: 

Enable0     need to say:    

EnableAxis0

 
Console>Help>   ,   DefineCS do not have a correct link to the reference description


Happy Milling,
Vlad

Group: DynoMotion Message: 845 From: Tom Kerekes Date: 1/5/2011
Subject: Re: How to add Home switch to Cofig?

Hi Vlad,
I don't see any inconsistency in your example.  By design we require you to re-enable an axis after it has been disabled.  In
the first case you enable the axis and are able to move, and in the second case you do not enable the axis and are not able
to move.  This seems correct to me.  Maybe the issue is that you are commanding a move to stop at exactly where the limit
should switch and the smallest mechanical error causes it to sometimes switch (and disable) and sometimes not?
Thanks for the bug reports.  Post them here and we will try to correct them in the next release.
Regards
Tom Kerekes